<template>
	<view class="home">
		<view class="status_bar"><!-- 这里是状态栏 --></view>
		<home1></home1>
		<home2 :innovate="innovate" :main_stream="main_stream" @tabChange="getNew"></home2>
	</view>
</template>

<script>
	import home1 from '../../components/home1/home1.vue'
	import home2 from '../../components/home2/home2.vue'
	import api from '../../common/api.js'
	export default{
		components:{
			home1,
			home2
		},
		data() {
			return {
				innovate: '',
				main_stream: ''
			}
		},
		onShow() {
			this.getNew()
		},
		methods: {
			getNew() {
				this.$api.sendRequest({
					url: api.CURRENCYNEWS,
					success: res => {
						this.innovate = res.data.innovate
						this.main_stream = res.data.main_stream
						console.log(111, this.innovate, this.main_stream)
					}
				});
			}
		}
	}
</script>

<style>
	.status_bar {
	       height: var(--status-bar-height);
	       width: 100%;
	   }

</style>
